/**
 * Project Name:renshuaipeng-auth
 * File Name:ProjectInitConfig.java
 * Package Name:ren.renshuaipeng.auth.conf
 * Date:2015年12月26日 上午10:11:55
 * Copyright (c) 2015, niao.shuai123@163.com All Rights Reserved.
 */

package ren.renshuaipeng.auth.web.conf;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import ren.renshuaipeng.auth.service.auth.AuthPermissionService;

/**
 * ClassName:  ProjectInitConfig.java<br/>
 * Function: . <br/>
 * Date:      2015年12月26日 上午10:11:55<br/>
 *
 * @author 任帅鹏（作者）
 * @version V1.00 （版本号）
 * @see
 * @since JDK 1.8
 */
@Configuration
public class ProjectInitConfig {
	
	private static final Logger logger = LoggerFactory
            .getLogger(ProjectInitConfig.class);
	
	@Bean(initMethod="init")
	ProjectInit getProjectInit(){
		ProjectInit projectInit=new ProjectInit();
		return projectInit;		
	}
	
	class ProjectInit{
		@Autowired
		private AuthPermissionService authPermissionService;
		void init(){
			System.err.println(authPermissionService.findAll().size());
			logger.info("init success");
		}
	}
	
	
}
